Telegram Group & Telegram Channel
3. Determining variable type with type()

>> a=7
>>> type(a)
<class 'int'>

>>> b=7.7
>>> type(b)
<class 'float'>

>>> c="hello"
>>> type(c)
<class 'str'>

>>> d=[1,2,3]
>>> type(d)
<class 'list'>

>>> e=(1,2,3)
>>> type(e)
<class 'tuple'>

>>> f={1:"one",2:"two"}
>>> type(f)
<class 'dict'>

>>> g={1,2,3}
>>> type(g)
<class 'set'>

>>> i=True
>>> type(i)
<class 'bool'>





You can check what type of object is assigned to a variable using Python's built-in type() function. Common data types include:

int (for integer)
float
str (for string)
list
tuple
dict (for dictionary)
set
bool (for Boolean True/False)

@python_codes



tg-me.com/python_codes/6
Create:
Last Update:

3. Determining variable type with type()

>> a=7
>>> type(a)
<class 'int'>

>>> b=7.7
>>> type(b)
<class 'float'>

>>> c="hello"
>>> type(c)
<class 'str'>

>>> d=[1,2,3]
>>> type(d)
<class 'list'>

>>> e=(1,2,3)
>>> type(e)
<class 'tuple'>

>>> f={1:"one",2:"two"}
>>> type(f)
<class 'dict'>

>>> g={1,2,3}
>>> type(g)
<class 'set'>

>>> i=True
>>> type(i)
<class 'bool'>





You can check what type of object is assigned to a variable using Python's built-in type() function. Common data types include:

int (for integer)
float
str (for string)
list
tuple
dict (for dictionary)
set
bool (for Boolean True/False)

@python_codes

BY Python Codes


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/python_codes/6

View MORE
Open in Telegram


Python Codes Telegram | DID YOU KNOW?

Date: |

How To Find Channels On Telegram?

There are multiple ways you can search for Telegram channels. One of the methods is really logical and you should all know it by now. We’re talking about using Telegram’s native search option. Make sure to download Telegram from the official website or update it to the latest version, using this link. Once you’ve installed Telegram, you can simply open the app and use the search bar. Tap on the magnifier icon and search for a channel that might interest you (e.g. Marvel comics). Even though this is the easiest method for searching Telegram channels, it isn’t the best one. This method is limited because it shows you only a couple of results per search.

Mr. Durov launched Telegram in late 2013 with his brother, Nikolai, just months before he was pushed out of VK, the Russian social-media platform he founded. Mr. Durov pitched his new app—funded with the proceeds from the VK sale—less as a business than as a way for people to send messages while avoiding government surveillance and censorship.

Python Codes from no


Telegram Python Codes
FROM USA